﻿using System.ComponentModel;

namespace InputBoxes.Controls
{
    [TypeConverter(typeof(ExpandableObjectConverter))]
    public class StaticTextInfo
    {
        private readonly IStaticTextBox _owner;

        internal StaticTextInfo(IStaticTextBox owner)
        {
            _owner = owner;
        }

        public IStaticTextBox Owner
        {
            get { return _owner; }
        }

        public string Text
        {
            get { return Owner.Text; }
            set
            {
                Owner.Text = value;
                Owner.OnChanged();
            }
        }

        public bool Visible
        {
            get { return Owner.Visible; }
            set
            {
                Owner.Visible = value;
                Owner.OnChanged();
            }
        }
    }
}